-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL][Graph] Add specification for kernel binary updates #14896
base: sycl
Are you sure you want to change the base?
Conversation
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions.
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions.
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and nd-range of node.
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and nd-range of node.
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and nd-range of node.
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and nd-range of node.
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and nd-range of node.
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and nd-range of node.
Implement Dynamic Command-Group feature for intel#14896 to enable updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and nd-range of node.
4637510
to
fcf08a6
Compare
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Adds the kernel binary update feature to the sycl graph specification. This introduces a new dynamic_command_group class which can be used to update the command-group function of a kernel nodes in graphs.
fcf08a6
to
119ba28
Compare
Co-authored-by: Pablo Reble <[email protected]>
Co-authored-by: Pablo Reble <[email protected]>
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](intel#14896) This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. This functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels from the E2E tests. The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. See the addition to the design doc for further details on the implementation.
Implement Dynamic Command-Group feature specified in PR [[SYCL][Graph] Add specification for kernel binary updates](#14896). This feature enables updating `ur_kernel_handle_t` objects in graph nodes between executions as well as parameters and execution range of nodes. Points to note in this change: * The functionality is currently supported on CUDA & HIP which are used for testing in the new E2E tests. Level Zero support will follow shortly, resulting in the removal of the `XFAIL` labels with tracker number from the E2E tests. * The code for adding nodes to a graph has been refactored to split out verification of edges, and marking memory objects used in a node, as separate helper functions. This allows path for adding a command-group node to do this functions over each CG in the list before creating the node itself. * The `dynamic_parameter_impl` code has also been refactored so the code is shared for updating a dynamic parameter used in both a regular kernel node and a dynamic command-group node. * There is now no need for the `handler::setNDRangeUsed()` API now that graph kernel nodes can update between kernels using `sycl::nd_range` and `sycl::range`. The functionality in this method has be turned into a no-op, however removing the method is an ABI breaking change, so it remains guarded by the `__INTEL_PREVIEW_BREAKING_CHANGES` macro. See the addition to the design doc for further details on the implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some minor comments about wording.
as active. When a dynamic command-group node is executed, the kernel of the active | ||
command-group function will be run and all the other command-group functions in | ||
`cgfList` will be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight concern that this reads like the currently active command group will always be the one that is executed (regardless of whether the graph has been updated) rather than the CGF that was active when the graph was finalized (or updated).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded this
Dynamic command-groups can only be used to update kernels. Trying to update a command-group | ||
function that contains other operations will result in an error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this reads like: you can have CGFs which are not kernel operations in a dynamic command group, but you can't update them. This error actually happens in the constructor for the dynamic command group, so should this read more like:
Dynamic command-groups can only contain kernel operations. Trying to construct a dynamic command-group with functions that contain other operations will result in an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use your suggested wording
Note that the execution range is tied to the command-group, therefore updating | ||
the range of a node which uses a dynamic command-group shared by another node | ||
will also update the execution range of the nodes sharing the dynamic | ||
command-group. Activating a command-group with `set_active_cgf` to a | ||
command-group that previously had its execution range updated with | ||
`node::update_range()` or `node::update_nd_range()` will not reset the execution | ||
range to the original, but instead use the most recently updated value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we mention explicitly that updating the range of a node using a dynamic command-group will only update the range of the currently active CGF? It is sort of implied by talking about the fact it won't be reset, but I think it would be good for clarity to specify it explicitly first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout, mentioned this explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from a few questions.
sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc
Outdated
Show resolved
Hide resolved
Also refine spec wording based on PR feedback
33ae1f4
to
3edf870
Compare
Adds the kernel binary update feature to the sycl graph specification. This introduces a new dynamic_command_group class which can be used to update the command-group function of a kernel nodes in graphs.
Implemented in: